unity c# set list to set active true

115

unity c# set list to set active true -

// Set all objects in list to true:
public class Program : MonoBehaviour
{
    public GameObject[] list;
    
    void Start()
    {
        foreach (var obj in list)
        {
            obj.SetActive(true);
        }
    }
}

Comments

Submit
0 Comments